<%@ page contentType="text/html;charset=UTF-8" language="java" %>
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core"%>
<html>
<head>
    <title>企业网站管理系统</title>
    <link rel="stylesheet" href="${pageContext.request.contextPath}/css/pintuer.css">
    <link rel="stylesheet" href="${pageContext.request.contextPath}/css/admin.css">
    <script src="${pageContext.request.contextPath}/js/jquery.js"></script>
    <script src="${pageContext.request.contextPath}/js/pintuer.js"></script>
    <script type="text/javascript">
        function deleteManager(id){
            if(confirm("您确定要删除吗?")){
                window.location.href='${pageContext.request.contextPath}/deleteMinMenu?min_id='+id+"&max_id="+${maxid};
            }

        }
    </script>
</head>
<body>
<div class="panel admin-panel">
    <form action="" method="post">
        <table class="table table-hover text-center">
            <tr>
                <th width="10%">序号</th>
                <th width="20%">下拉菜单名称</th>
                <th width="15%">操作</th>
            </tr>
            <c:forEach items="${requestScope.listMinMenu}" var="a" varStatus="status" >
                <tr>
                    <td>${status.count}</td>
                    <td>${a.min_name }</td>
                    <td><div class="button-group">
                        <a class="button border-main" href="${pageContext.request.contextPath}/findMinMenuById?min_id=${a.min_id}"><span class="icon-edit"></span> 修改</a>
                        <a class="button border-red" href="javascript:void(0)" onclick="return deleteManager(${a.min_id})"><span class="icon-trash-o"></span> 删除</a>
                    </div></td>
                </tr>
            </c:forEach>
        </table>
    </form>
    <form action="${pageContext.request.contextPath}/addMinMenu" method="post" style="margin-top: 10px; padding-top: 5px">
        <div class="addMenu">
            下拉菜单名称：<input type="text" name="min_name" /><br>
            <input type="hidden" name="maxid" value="${maxid }"/>
            <input type="submit" value="添加"/>
        </div>
    </form>
</div>
</body>
</html>
